package com.action;

import java.util.List;

import com.dao.SProductDao;
import com.dao.impl.SProductDaoImpl;
import com.opensymphony.xwork2.ActionSupport;
import com.po.SProduct;

public class SProductAction extends ActionSupport {

	private int pageNumber = 1;
	private int pageSize = 9;
	private List<SProduct> list;
	private SProductDao dao = new SProductDaoImpl();
	private SProduct product;

	public int getPageNumber() {
		return pageNumber;
	}

	public void setPageNumber(int pageNumber) {
		this.pageNumber = pageNumber;
	}

	public int getPageSize() {
		return pageSize;
	}

	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}


	public List<SProduct> getList() {
		return list;
	}

	public SProduct getProduct() {
		return product;
	}

	public String pageFindAll() {
		list = dao.pageFindAll(pageNumber, pageSize);
		return SUCCESS;
	}
}
